package com.smw.cmd.game;

import com.smw.net.ICmd;
import com.smw.net.NetEncoding;

public class MSG_Enter_Room_Ret  implements ICmd{
	public int cmd;   //命令 S2C_ENTER_ROOM_FAILED  S2C_ENTER_ROOM_OK
	public int errcode;//若失败，返回码
	public int table_num; //玩家所在table号
	public int chairID;//

	@Override
	public int ReadFromByteArray(byte[] data, int pos) {
		int index = pos;

		cmd = NetEncoding.read4Byte(data, index);
		index += 4;

		errcode = NetEncoding.read4Byte(data, index);
		index += 4;

		table_num = NetEncoding.read4Byte(data, index);
		index += 4;
		chairID = NetEncoding.read4Byte(data, index);
		index += 4;

		return index - pos;
	}

	@Override
	public int WriteToByteArray(byte[] data, int pos) {
		int index = pos;

		return index - pos;
	}

}
